home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / WINDOWS / WIN_MORT.ARJ / MONEYCL.H < prev    next >
C/C++ Source or Header  |  1992-01-04  |  789b  |  39 lines

  1. // MONEYCL.H: Money Class Hader File
  2. //
  3. // Author:    Robert H. Kornberg
  4. // Date:    01-03-92
  5. //
  6. // This class is designed to perform basic manipulation of Money as both
  7. // a Double and a String.
  8.  
  9. #ifndef __STDLIB_H
  10. #include <stdlib.h>
  11. #endif
  12.  
  13. #ifndef __STRING_H
  14. #include <string.h>
  15. #endif
  16.  
  17. #ifndef __STDIO_H
  18. #include <stdio.h>
  19. #endif
  20.  
  21. #define MONEYSIZE    19
  22.  
  23. class MoneyCl
  24. {
  25.     double    dVal;
  26.     char    sVal[MONEYSIZE];
  27. public:
  28.     MoneyCl ();
  29.     MoneyCl (char *s);
  30.     MoneyCl (double d);
  31.     virtual void SetValue(char *s);
  32.     virtual void SetValue(double d);
  33.     virtual void ConvToString();
  34.     virtual void ConvToVal();
  35.     virtual void FormatMoney(char *s);
  36.     virtual void StripWhite(char *s);
  37.     virtual double MoneyVal() { return dVal; }
  38.     virtual char *MoneyStr() { return sVal; }
  39. };